﻿<wpfui:UiWindow
    x:Class="LenovoLegionToolkit.WPF.Windows.Utils.UnsupportedWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:resources="clr-namespace:LenovoLegionToolkit.WPF.Resources"
    xmlns:utils="clr-namespace:LenovoLegionToolkit.WPF.Utils"
    xmlns:wpfui="http://schemas.lepo.co/wpfui/2022/xaml"
    Title="{x:Static resources:Resource.UnsupportedWindow_Title}"
    MinWidth="650"
    MinHeight="420"
    MaxWidth="650"
    MaxHeight="420"
    Closed="Window_Closed"
    ExtendsContentIntoTitleBar="True"
    FlowDirection="{x:Static utils:LocalizationHelper.Direction}"
    Loaded="Window_Loaded"
    ResizeMode="NoResize"
    Topmost="True"
    WindowStartupLocation="CenterScreen">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <wpfui:TitleBar
            Title="{x:Static resources:Resource.UnsupportedWindow_Title}"
            Grid.Row="0"
            CanMaximize="false"
            ShowMaximize="false"
            ShowMinimize="false"
            UseSnapLayout="false" />

        <Grid Grid.Row="1" Margin="16">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <StackPanel
                Grid.Row="0"
                Grid.Column="0"
                Margin="0,0,16,0">
                <wpfui:SymbolIcon FontSize="56" Symbol="ErrorCircle24" />
            </StackPanel>

            <StackPanel Grid.Row="0" Grid.Column="1">
                <TextBlock
                    Margin="0,0,0,16"
                    FontWeight="Medium"
                    Text="{x:Static resources:Resource.UnsupportedWindow_Message}"
                    TextWrapping="Wrap" />

                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <TextBlock
                        Grid.Row="0"
                        Grid.Column="0"
                        FontWeight="Medium"
                        Text="{x:Static resources:Resource.UnsupportedWindow_Vendor}" />
                    <TextBlock
                        Grid.Row="1"
                        Grid.Column="0"
                        FontWeight="Medium"
                        Text="{x:Static resources:Resource.UnsupportedWindow_Model}" />
                    <TextBlock
                        Grid.Row="2"
                        Grid.Column="0"
                        FontWeight="Medium"
                        Text="{x:Static resources:Resource.UnsupportedWindow_MachineType}" />

                    <TextBlock
                        x:Name="_vendorText"
                        Grid.Row="0"
                        Grid.Column="1" />
                    <TextBlock
                        x:Name="_modelText"
                        Grid.Row="1"
                        Grid.Column="1" />
                    <TextBlock
                        x:Name="_machineTypeText"
                        Grid.Row="2"
                        Grid.Column="1" />
                </Grid>

                <TextBlock
                    Margin="0,16,0,24"
                    Text="{x:Static resources:Resource.UnsupportedWindow_Disclaimer}"
                    TextWrapping="Wrap" />

                <wpfui:Hyperlink Content="{x:Static resources:Resource.UnsupportedWindow_Disclaimer_GitHub}" NavigateUri="https://github.com/BartoszCichecki/LenovoLegionToolkit#contribution" />

            </StackPanel>

            <Grid
                Grid.Row="1"
                Grid.Column="0"
                Grid.ColumnSpan="2"
                Margin="0,16,0,0"
                HorizontalAlignment="Right">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="16" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <wpfui:Button
                    Grid.Column="0"
                    MinWidth="120"
                    Appearance="Primary"
                    Click="Exit_Click"
                    Content="{x:Static resources:Resource.Exit}" />
                <wpfui:Button
                    x:Name="_continueButton"
                    Grid.Column="2"
                    MinWidth="120"
                    Appearance="Secondary"
                    Click="Continue_Click"
                    Content="{x:Static resources:Resource.Continue}"
                    IsEnabled="False" />
            </Grid>
        </Grid>
    </Grid>

</wpfui:UiWindow>
